<input type="color" value="#000000">
<script>
var input = document.querySelector('input');
input.offsetTop;
input.setAttribute('value', '#ff0000');
</script>
